package com.fujimana.rockincat.restree.message;

import java.util.HashMap;
import java.util.Locale;
import java.util.Map;

public class Message {
	
	private String id;
	
	private Map<String, String> localeMessages;

	public String getId() {
		return id;
	}
	
	public Message(String id) {
		this();
		this.id = id;
	}

	public Message() {
		this.localeMessages = new HashMap<String, String>();
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getMesssage(Locale locale) {
		return this.localeMessages.get(locale.getDisplayName());
	}
	
	public void setMesssage(String message, Locale locale) {
		this.localeMessages.put(locale.getDisplayName(), message);
	}
	
	public boolean isLocale(Locale locale) {
		return this.localeMessages.containsKey(locale.getDisplayName());
	}
}
